Skip to content

Resolve the OS platform on demand - #1900

Merged
SimonCropp merged 1 commit into
mainfrom
fix-lazy-os-platform
Aug 29, 2026
Merged

Resolve the OS platform on demand#1900
SimonCropp merged 1 commit into
mainfrom
fix-lazy-os-platform

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

GetOsPlatform throws for any platform outside Linux, Windows, OSX, Android and iOS, and it ran from the Namer static constructor. VerifySettings creates a Namer, so on FreeBSD, browser-wasm or tvOS every verification failed with a TypeInitializationException, including the tests that never asked for UniqueForOSPlatform.

It is now resolved by the property, which only PrefixUnique reads, and only when UniqueForOSPlatform is actually set. The message also names the platform now, since 'Unknown OS' gave nothing to act on.

GetOsPlatform throws for any platform outside Linux, Windows, OSX, Android and
iOS, and it ran from the Namer static constructor. VerifySettings creates a
Namer, so on FreeBSD, browser-wasm or tvOS every verification failed with a
TypeInitializationException, including the tests that never asked for
UniqueForOSPlatform.

It is now resolved by the property, which only PrefixUnique reads, and only when
UniqueForOSPlatform is actually set. The message also names the platform now,
since 'Unknown OS' gave nothing to act on.
@SimonCropp SimonCropp added this to the 33.0.0 milestone Aug 29, 2026
@SimonCropp
SimonCropp merged commit 5760ad9 into main Aug 29, 2026
6 of 7 checks passed
@SimonCropp
SimonCropp deleted the fix-lazy-os-platform branch August 29, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant